package com.funtl.screw.common.gateway.version;

import org.springframework.cloud.client.ServiceInstance;
import org.springframework.http.server.reactive.ServerHttpRequest;

/**
 * 路由
 *
 * @author Lusifer
 */
public interface ServiceRouteLoadBalancer {

    /**
     * 根据serviceId 筛选可用服务
     *
     * @param serviceId 服务ID
     * @param request   当前请求
     * @return ServiceInstance
     */
    ServiceInstance choose(String serviceId, ServerHttpRequest request);

}
